/*
 * CUnitBuilder.h
 *
 *  Created on: Nov 3, 2008
 *      Author: Ryan
 */

#ifndef CUNITBUILDER_H_
#define CUNITBUILDER_H_

#include "UnitBuilder.h"

namespace OOInterface
{

class CUnitBuilder: public OOInterface::UnitBuilder
{
public:
	CUnitBuilder();
	virtual ~CUnitBuilder();

	virtual UnitBuilder& addName( std::string name );
	virtual UnitBuilder& addID( int id );
	virtual UnitBuilder& addSize( unsigned int xSize, unsigned int ySize );
	virtual UnitBuilder& addMaxHealth( float max );
	virtual UnitBuilder& addBuildTime( float time );
	virtual UnitBuilder& addTransportability();

	virtual UnitBuilder& addResourceCost( const Resource& r, float amt );
	virtual UnitBuilder& addResourceUpkeep( const Resource& r, float amt );
	virtual UnitBuilder& addResourceStorage( const Resource& r, float amt );
	virtual UnitBuilder& addResourceGeneration( const Resource& r, float amt );

	virtual UnitBuilder& addResourceExtractorAspect( const Resource& r, float radius );

	//Aspects
	virtual UnitBuilder& addAirAspect( float minHeight, float maxHeight );
	virtual UnitBuilder& addWaterAspect();
	virtual UnitBuilder& addLandAspect();

	virtual UnitBuilder& addTransportAspect();

	virtual UnitBuilder& addBuilderAspect( const ConstUnitSet& buildableUnits, float buildDistance = 0.0f, float buildSpeed = 0.0f, float repairSpeed = 0.0f, float captureSpeed = 0.0f, float reclaimSpeed = 0.0f);
	virtual UnitBuilder& addBuildingAspect( float minWaterDepth, float maxWaterDepth, float maxHeightDifference );

	void reset( Unit* u);
	Unit* getUnit();
private:
	Unit* _unit;
};

}

#endif /* CUNITBUILDER_H_ */
